package com.xgggh.redpack.domain.home;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.databinding.BaseObservable;

import com.xgggh.redpack.domain.redpack.Pack;

import java.util.List;

public class NavHome extends BaseObservable implements Parcelable {
    private String name;
    private String icon;
    private List<Pack> packList;

    public List<Pack> getPackList() {
        return packList;
    }

    public void setPackList(List<Pack> packList) {
        this.packList = packList;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public NavHome() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.icon);
        dest.writeTypedList(this.packList);
    }

    protected NavHome(Parcel in) {
        this.name = in.readString();
        this.icon = in.readString();
        this.packList = in.createTypedArrayList(Pack.CREATOR);
    }

    public static final Creator<NavHome> CREATOR = new Creator<NavHome>() {
        @Override
        public NavHome createFromParcel(Parcel source) {
            return new NavHome(source);
        }

        @Override
        public NavHome[] newArray(int size) {
            return new NavHome[size];
        }
    };
}
